package com.zhc.dejingapi.controller;


import com.zhc.dejingapi.service.IGetStringService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/Str")

public class StrGetController {

    private final IGetStringService getStringService;
    public StrGetController(IGetStringService getStringService1) {
        this.getStringService = getStringService1;
    }

    @GetMapping("/getStr")
    public ResponseEntity<String> getStr(@RequestParam("strInput") String strInput)
    {
        String strBack= getStringService.GetString(strInput);
        return ResponseEntity.ok(strBack);
    }
}
